import {setServer} from "@/utils/axios";
import {messageUrl} from "../../../url";
const messageRequest = setServer(messageUrl);

// 查询消息渠道
export function getMethod(query) {
  return messageRequest({
    url: '/data/method/',
    method: 'get',
    params: query
  })
}

// 查询消息渠道详情
export function getMethodDetail(id) {
  return messageRequest({
    url: '/data/method/'+id,
    method: 'get',
  })
}

// 新增消息渠道
export function addMethod(query) {
  return messageRequest({
    url: '/data/method/',
    method: 'post',
    data: query
  })
}

// 修改消息渠道
export function updateMethod(query) {
  return messageRequest({
    url: '/data/method/',
    method: 'put',
    data: query
  })
}

// 删除消息渠道
export function deleteMethod(id) {
  return messageRequest({
    url: '/data/method/'+id,
    method: 'delete',
  })
}
